package terra.definitions.item;

public class WeaponDef extends WearDef
{
	public int damage;
	public int radius;
	public int type;
	//for shields
	public int armor;

	public WeaponDef(){
		isStackable = false;
	}

	public static int getTypeForString(String text)	{
		if (text.equalsIgnoreCase("close"))
			return 0;
		else if (text.equalsIgnoreCase("range"))
			return 1;
		else if (text.equalsIgnoreCase("spell"))
			return 2;		
		return 0;
	}
	
	public static String getStringForType(int type)	{
		switch(type){
			case 0: return "close";
			case 1: return "range";
			case 2: return "spell";
		}
		return "close";
	}
}
